import request from '@/utils/request'

/**
 * 库位信息分页查询
 * @param {查询条件} data
 */
export function pageFacLoc(query) {
	return request({
		url: 'FacManage/FacLoc/pageList',
		method: 'get',
		params: query,
	})
}

/**
 * 获取货位树信息
 * @param {查询条件} data
 */
export function treeFacLoc(query) {
	return request({
		url: 'FacManage/FacLoc/treeList',
		method: 'get',
		params: query,
	})
}

/**
 * 新增库位信息
 * @param data
 */
export function addFacLoc(data) {
	return request({
		url: 'FacManage/FacLoc',
		method: 'post',
		data: data,
	})
}
/**
 * 修改库位信息
 * @param data
 */
export function updateFacLoc(data) {
	return request({
		url: 'FacManage/FacLoc',
		method: 'PUT',
		data: data,
	})
}
/**
 * 获取库位信息详情
 * @param {Id}
 */
export function getFacLoc(id) {
	return request({
		url: 'FacManage/FacLoc/' + id,
		method: 'get'
	})
}

/**
 * 删除库位信息
 * @param {主键} pid
 */
export function delFacLoc(pid) {
	return request({
		url: 'FacManage/FacLoc/delete',
		method: 'POST',
		data: pid
	})
}
